// Copyright Druid Mechanics


#include "AbilitySystem/Abilities/ArcaneShards.h"

FString UArcaneShards::GetDescription(int32 Level)
{
	const int32 ScaleDamage = Damage.GetValueAtLevel(Level);
	const float ManaCost = FMath::Abs(GetManaCost(Level));
	const float Cooldown = GetCooldown(Level);
	if (Level == 1)
	{
		return FString::Printf(
			TEXT(
				"<Title>ARCANE SHARDS</>\n\n"
				"<Small>Level: </><Level>%d</>\n"
				"<Small>ManaCost: </><ManaCost>%.1f</>\n"
				"<Small>Cooldown: </><Cooldown>%.1f</>\n\n"
				"<Default>Summon shards of arcane energy, causing raidal arcane damage of </>"
				"<Damage>%d</>"
				"<Default> at the shard origin.</>"),
			Level, ManaCost, Cooldown, ScaleDamage);
	}
	else
	{
		return FString::Printf(
			TEXT(
				"<Title>ARCANE SHARDS</>\n\n"
				"<Small>Level: </><Level>%d</>\n"
				"<Small>ManaCost: </><ManaCost>%.1f</>\n"
				"<Small>Cooldown: </><Cooldown>%.1f</>\n\n"
				"<Default>Summon %d shards of arcane energy, causing radial arcane damage of </>"
				"<Damage>%d</>"
				"<Default> damage.</>"),
			Level, ManaCost, Cooldown, FMath::Min(Level, MaxNumShards), ScaleDamage);
	}
}

FString UArcaneShards::GetNextLevelDescription(int32 Level)
{
	const int32 ScaleDamage = Damage.GetValueAtLevel(Level);
	const float ManaCost = FMath::Abs(GetManaCost(Level));
	const float Cooldown = GetCooldown(Level);
	return FString::Printf(
		TEXT(
			"<Title>LEVEL NEXT</>\n\n"
			"<Small>Level: </><Level>%d</>\n"
			"<Small>ManaCost: </><ManaCost>%.1f</>\n"
			"<Small>Cooldown: </><Cooldown>%.1f</>\n\n"
			"<Default>Summon %d shards of arcane energy, causing radial arcane damage of </>"
			"<Damage>%d</>"
			"<Default> damage.</>"),
		Level, ManaCost, Cooldown, FMath::Min(Level, MaxNumShards), ScaleDamage);
}
